package com.cashmama.market.api.application.controller.order.request;

import com.cashmama.market.api.infras.exception.ApplicationException;
import com.cashmama.market.api.infras.utils.StringUtils;
import com.fqgj.common.api.ParamsObject;

/**
 * @program: market-api
 * @description 订单详情
 * @author: frank
 * @create: 2019-12-25 15:42
 **/
public class OrderDetailRequest extends ParamsObject {

    private String tradeNo;

    public String getTradeNo() {
        return tradeNo;
    }

    public OrderDetailRequest setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
        return this;
    }

    @Override
    public void validate() {
        if(StringUtils.isEmpty(tradeNo)){
            throw new ApplicationException("tradeNo can not be empty");
        }
    }
}
